<template>
    <lightning-card title="WireGetObjectInfo" icon-name="custom:custom67">
        <div class="slds-var-m-horizontal_medium">
            <lightning-input
                value="Account"
                placeholder="Enter object API name"
                label="Search"
            ></lightning-input>
            <p class="slds-var-p-vertical_small">
                <lightning-button
                    label="Get Object Info"
                    onclick={handleBtnClick}
                ></lightning-button>
            </p>
            <template lwc:if={objectInfo.data}>
                <div class="scroller">
                    <pre>{objectInfoStr}</pre>
                </div>
            </template>
            <template lwc:elseif={objectInfo.error}>
                <c-error-panel errors={objectInfo.error}></c-error-panel>
            </template>
        </div>
        <c-view-source source="lwc/wireGetObjectInfo" slot="footer">
            Get metadata about a specific object. The metadata includes fields,
            child relationships, record type, and theme. Enter an object name
            and click the "Get Object Info" button to see the recipe in action.
        </c-view-source>
    </lightning-card>
</template>
